package com.ruoyi.xiaoshou.mapper;

import java.util.List;

import com.ruoyi.IndexDtoByTwo;
import com.ruoyi.xiaoshou.domain.SaleBack;
import com.ruoyi.xiaoshou.domain.SaleOrder;
import org.apache.ibatis.annotations.Param;

/**
 * 销售退货单Mapper接口
 * 
 * @author lmj
 * @date 2024-10-29
 */
public interface SaleBackMapper 
{
    /**
     * 查询销售退货单
     * 
     * @param id 销售退货单主键
     * @return 销售退货单
     */
    public SaleBack selectSaleBackById(Integer id);
    SaleBack selectSaleBackByCode(String saleBackCode);
    /**
     * 查询销售退货单列表
     * 
     * @param saleBack 销售退货单
     * @return 销售退货单集合
     */
    public List<SaleBack> selectSaleBackList(SaleBack saleBack);
    public List<SaleBack> noReconList(SaleBack saleBack);
    public List<SaleBack> getUseList(SaleBack saleBack);
    List<SaleBack> selectSaleBackListForReciveOrder(SaleBack saleBack);
    List<SaleBack> selectSaleBackListByOrderCodes(@Param("codes") String[] codes);
    public IndexDtoByTwo getSaleBackCountAndMoney();
    /**
     * 新增销售退货单
     * 
     * @param saleBack 销售退货单
     * @return 结果
     */
    public int insertSaleBack(SaleBack saleBack);
    public int getSaleBackCount(SaleBack saleBack);
    /**
     * 修改销售退货单
     * 
     * @param saleBack 销售退货单
     * @return 结果
     */
    public int updateSaleBack(SaleBack saleBack);

    /**
     * 删除销售退货单
     * 
     * @param id 销售退货单主键
     * @return 结果
     */
    public int deleteSaleBackById(Integer id);

    /**
     * 批量删除销售退货单
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSaleBackByIds(Integer[] ids);
}
